#ifndef CODEEDITOR_H
#define CODEEDITOR_H

#include <QTextEdit>
#include <set>
#include <Qstring>
using std::set;

#include "../../WidgetBase/src/widgetbase.h"


class CodeEditor : public WidgetBase,public QTextEdit
{
public:
	CodeEditor(QWidget *parent = 0);
	~CodeEditor();

private slots:
	void changeKeyWord();

private:
	void dealWithPara(int para);
	void changeTheColor(int para,int start,int length,bool change = true);
	void addKeyWord();
	set<QString> keyWord;
	int prePara;
	int nowPara;
};

#endif // CODEEDITOR_H
